<?php

/*
  This model provides all interfaces for user management
 */

class Positions_model extends CI_Model {

    protected $lang_id;

    public function __construct() {
        parent::__construct();
        $this->lang_id = get_language_id();
    }
    
    public function getPositions(){
        $this->db->select('*');
        $this->db->from('positions');
        $this->db->join('positions_description', 'positions.position_id = positions_description.position_id');
        
        $this->db->where('positions_description.language_id', $this->lang_id);
        
        $query = $this->db->get();

        $results = $query->result();
        return $results;
    }
}